package com.py.utils.common;

import com.py.model.user.pojos.ApUser;

/**
 * @Description TODO
 * @Author bo.li
 * @Date 2022/11/10 9:39
 * @Version 1.0
 */
public class ApUserThreadLocalUtil {

    private static ThreadLocal<ApUser> USER_THREAD_LOCAL = new ThreadLocal<>();


    public static void set(ApUser user){
        USER_THREAD_LOCAL.set(user);
    }


    public static ApUser get(){
        return USER_THREAD_LOCAL.get();
    }


    public static void clear(){
        USER_THREAD_LOCAL.remove();
    }


}